package xhwl.hmo.mall.ui;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import xhwl.hmo.mall.BaseActivity;
import xhwl.hmo.mall.R;

/**
 * Created by admin on 2017-10-31.
 */

public class PaymentSuccActivity extends BaseActivity implements View.OnClickListener {
    private android.widget.TextView tvCheckOrder;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_payment_success);

    }

    @Override
    public void initViews() {
        initTitleViews();
        this.tvCheckOrder = (TextView) findViewById(R.id.tvCheckOrder);
    }

    @Override
    protected void setUpTitleView() {
        super.setUpTitleView();
        titleTextView.setText("支付成功");
    }

    @Override
    public void initListener() {
        this.tvCheckOrder.setOnClickListener(this);
    }

    @Override
    public void loadData() {

    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.tvCheckOrder:
                // TODO: 2017-11-06 跳转订单
//                Intent intent=new Intent(mContext,InfoOrderActivity.class);
//                intent.putExtra("order_id",getIntent().getStringExtra(PaymentActivity.EXTRA_ORDER_NO));
//                startActivity(intent);
                Intent intent=new Intent(mContext,MyOrderListActivity.class);
                intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_CLEAR_TOP);
                startActivity(intent);
                break;
        }
    }
}
